package com.exam.test.utils;


import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

/**
 * @ClassName : Receiver
 * @Description :
 * @Author : WHB
 */


public class Receiver {

    public String stuId ;
    public String classesId;


    public void setStuId(String stuId) {
        this.stuId = stuId;
    }

    public void setClassesId(String classesId) {
        this.classesId = classesId;
    }

//    @Bean
//    public org.springframework.amqp.core.Queue queue(){
//        return new org.springframework.amqp.core.Queue("exam.classes.exchange"+stuId);
//    }
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = "#{queue.name}" ,durable = "true"),
//            exchange = @Exchange(name = "exam.classes.exchange", type = ExchangeTypes.FANOUT)
//    ))
//    @RabbitHandler
//    public void message(String message, @Payload Order order){
//        System.out.println(message+"11111111111");
//    }

}
